home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / nrpas13.zip / BESSY0.DEM < prev    next >
Text File  |  1991-04-29  |  555b  |  26 lines

  1. PROGRAM d6r16(input,output,dfile);
  2. (* driver for routine BESSY0 *)
  3. VAR
  4.    i,nval : integer;
  5.    val,x : real;
  6.    txt : string[18];
  7.    dfile : text;
  8.  
  9. (*$I MODFILE.PAS *)
  10. (*$I BESSJ0.PAS *)
  11.  
  12. (*$I BESSY0.PAS *)
  13.  
  14. BEGIN
  15.    glopen(dfile,'fncval.dat');
  16.    REPEAT readln(dfile,txt) UNTIL (txt = 'Bessel Function Y0');
  17.    readln(dfile,nval);
  18.    writeln (txt);
  19.    writeln ('x':5,'actual':12,'bessy0(x)':13);
  20.    FOR i := 1 to nval DO BEGIN
  21.       readln(dfile,x,val);
  22.       writeln(x:6:2,val:12:7,bessy0(x):12:7)
  23.    END;
  24.    close(dfile)
  25.  END.
  26.